package com.gitee.tanmingjian.httptunnel.core.bean;

import java.util.Objects;

public class FieldHeader {

    private String name;
    private String tableName;
    private Integer typeId;
    private Integer flags;
    private Integer length;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public Integer getTypeId() {
        return typeId;
    }

    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }

    public Integer getFlags() {
        return flags;
    }

    public void setFlags(Integer flags) {
        this.flags = flags;
    }

    public Integer getLength() {
        return length;
    }

    public void setLength(Integer length) {
        this.length = length;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        FieldHeader that = (FieldHeader) o;
        return Objects.equals(name, that.name) && Objects.equals(tableName, that.tableName) && Objects.equals(typeId, that.typeId) && Objects.equals(flags, that.flags) && Objects.equals(length, that.length);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, tableName, typeId, flags, length);
    }

    @Override
    public String toString() {
        return "FieldHeader{" +
                "name='" + name + '\'' +
                ", tableName='" + tableName + '\'' +
                ", typeId=" + typeId +
                ", flags=" + flags +
                ", length=" + length +
                '}';
    }
}
